﻿<UserControl
    x:Class="WinRTXamlToolkit.Sample.Views.UIElementAnimationExtensionsTestView"
    IsTabStop="false"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:xc="using:WinRTXamlToolkit.Controls"
    xmlns:local="using:WinRTXamlToolkit.Sample.Views"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition
                Height="Auto" />
            <RowDefinition
                Height="Auto" />
            <RowDefinition
                Height="Auto" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <Border
            x:Name="testBorder"
            Grid.ColumnSpan="2"
            Background="Yellow"
            Width="400"
            Height="300" />

        <Button
            x:Name="FadeInThemeButton"
            Grid.Row="1"
            VerticalAlignment="Center"
            HorizontalAlignment="Center"
            Width="200"
            Height="100"
            Margin="0,50"
            Content="FadeIn (Theme)"
            Click="OnFadeInThemeButtonClick" />
        <Button
            x:Name="FadeOutThemeButton"
            Grid.Row="1"
            Grid.Column="1"
            VerticalAlignment="Center"
            HorizontalAlignment="Center"
            Width="200"
            Height="100"
            Margin="0,50"
            Content="FadeOut (Theme)"
            Click="OnFadeOutThemeButtonClick" />

        <Button
            x:Name="FadeInCustomButton"
            Grid.Row="2"
            VerticalAlignment="Center"
            HorizontalAlignment="Center"
            Width="200"
            Height="100"
            Margin="0,50"
            Content="FadeInCustom"
            Click="OnFadeInCustomButtonClick" />
        <Button
            x:Name="FadeOutCustomButton"
            Grid.Row="2"
            Grid.Column="1"
            VerticalAlignment="Center"
            HorizontalAlignment="Center"
            Width="200"
            Height="100"
            Margin="0,50"
            Content="FadeOutCustom"
            Click="OnFadeOutCustomButtonClick" />

        <Grid
            Grid.ColumnSpan="2"
            Grid.Row="3"
            Height="40"
            HorizontalAlignment="Stretch">
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition
                    Width="Auto" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <TextBlock
                HorizontalAlignment="Right"
                VerticalAlignment="Bottom"
                Margin="10"
                Text="Opacity" />
            <Slider
                Grid.Column="1"
                VerticalAlignment="Center"
                Width="400"
                Value="{Binding Opacity, ElementName=testBorder, Mode=TwoWay}"
                Minimum="0"
                Maximum="1"
                StepFrequency="0.01" />
            <TextBlock
                Grid.Column="2"
                HorizontalAlignment="Left"
                VerticalAlignment="Bottom"
                Margin="10"
                Text="{Binding Opacity, ElementName=testBorder}" />
        </Grid>
    </Grid>
</UserControl>
